﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.CMS.Providers;
using MethodWorx.CMS.Membership;

namespace MethodWorx.CMS.Workflow
{
    public class NullWorkflowExecutionContext : IWorkflowExecutionContext
    {
        #region IWorkflowExecutionContext Members

        public object GetWorkflowValue(string name)
        {
            return null;
        }

        public IEnumerable<string> GetWorkflowErrors(string name)
        {
            return (IEnumerable<string>)new string [0];
        }

        public void AddWorkflowError(string name, string value)
        {
            
        }

        public bool IsValid()
        {
            return true;
        }

        

        public ICmsDataProvider CmsDataProvider { get; set; }
        #endregion


        public Dictionary<string, string> GetAllWorkflowValues()
        {
            return new Dictionary<string, string>();
        }


        public void AddWorkflowValue(string name, object value)
        {
            
        }


        public T GetService<T>()
        {
            return this.CmsDataProvider.GetService<T>();
        }

        public User CurrentUser
        {
            get
            {
                return new User();
            }
        }
    }
}
